package com.chixing.day17.Thread;

public class TestChar {
    public static void main(String[] args) {
        //主线程
        String threadName = Thread.currentThread().getName(); //main
        System.out.println(threadName);

        CharThread chixing = new CharThread(); //初始化线程:开辟堆内存
        chixing.start(); //启动线程：就绪态

        NumberThread ch = new NumberThread();
        ch.start();

        Thread b = new Thread(new EvenTread(),"偶数线程数======");
        Thread a = new Thread(new OddThread(b),"奇数线程数======");
        b.setPriority(1); //优先级
        a.start();
        b.start();

        System.out.println("main优先级: " + Thread.currentThread().getName() + " " + Thread.currentThread().getPriority());
        System.out.println("a的优先级: " + a.getPriority());
        System.out.println("b的优先级: " +b.getPriority());






    }
}
